<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <h1 v-fontsize="'50px'">2222</h1>
  </div>
  <div id="app1">
    <h1 v-fontsize="'50px'">3333</h1>
  </div>
  <script src="../vue.js"></script>
  <script>
    Vue.directive('fontsize', (el, binding) => {  // el表示当前的标签
      console.log(el, binding);

      el.style.fontSize = binding.value
    })
    const vm = new Vue({
      el: "#app"
    })
    const vm1 = new Vue({
      el: "#app1"
    })
  </script>
</body>

</html>